package config

import (
	shared "github.com/devops-smartbot/devops-smartbot/shared/config"
)

// Config holds ticket-service runtime configuration.
type Config struct {
	GRPCPort      int
	MongoURI      string
	MongoDatabase string
}

// FromShared builds service config from shared configuration file.
func FromShared(cfg *shared.Config) Config {
	return Config{
		GRPCPort:      cfg.App.GRPCPort,
		MongoURI:      cfg.Mongo.URI,
		MongoDatabase: cfg.Mongo.Database,
	}
}
